﻿using GBlog.Core.Entities;
using System.Data.Entity;
namespace GBlog.Core.Mapping
{
    public class UserMap : MapBase<User, int>
    {
        public UserMap()
        {
            ToTable("Core_User");
            RegisterID();
            Property(t => t.Username).IsRequired().HasMaxLength(32);
            Property(t => t.Password).IsRequired().HasMaxLength(32);
            Property(t => t.Email).IsRequired().HasMaxLength(64);
            Property(t => t.Seo).IsRequired().HasMaxLength(32);
            Property(t => t.Website);
            Property(t => t.Access).IsRequired();
            RegisterDefault();
        }
    }
}